import 'package:flutter/material.dart';
import 'dart:ui';
import 'package:flutter_screenutil/flutter_screenutil.dart';

const kDefaultColor = Color.fromRGBO(77, 117, 215, 1);
const kGrayColor = Color.fromRGBO(240, 240, 240, 1);
const String MONEY = "¥";
const String WX_APPID = 'wx65ad1b87d6d64758';
const String WECHAT_UNIVERSAL_LINK = "https://yres.dmooo.com/";
const String WX_APP_SECRET = '17121da4739615865c28f6c92244095a';

const String TOKEN = "token";
const String UID = "uid";
const String INFORM = "inform";
const String PHONE = "phone";
const String PWD = "pwd";
const String ALIPAY = "alipay";
const String GROUP_NAME = "group_name";
const String GROUP_ID = "group_id";
const String TRUENAME = "truename";

double kWindowstateHeight = MediaQueryData.fromWindow(window).padding.top; //状态栏
// double kScreenWidth = ScreenUtil.getInstance().setWidth(750);
// double kScreenHeight = ScreenUtil.getInstance().setHeight(1334);
// double kMargin5 = ScreenUtil.getInstance().setWidth(5);
// double kMargin10 = ScreenUtil.getInstance().setWidth(10);
// double kMargin8 = ScreenUtil.getInstance().setWidth(8);
// double kMargin15 = ScreenUtil.getInstance().setWidth(15);
// double kMargin20 = ScreenUtil.getInstance().setWidth(20);
// double kMargin25 = ScreenUtil.getInstance().setWidth(25);
// double kMargin28 = ScreenUtil.getInstance().setWidth(28);
// double kMargin100 = ScreenUtil.getInstance().setWidth(100);
// double kMargin120 = ScreenUtil.getInstance().setWidth(120);
// double kSearchBarHeight = ScreenUtil.getInstance().setWidth(60);



const double kBottomNavigationBarHeight = 56.0;

MediaQueryData mediaQuery = MediaQueryData.fromWindow(window);
double _height = mediaQuery.size.height;

const double BIG_FONT_SIZE = 34;
const double NORMAL_FONT_SIZE = 30;
const double SMALL_FONT_SIZE = 26;
const double MINI_FONT_SIZE = 22;
const double NINIEST_FONT_SIZE = 19;

const double DP_100 = 100;
const double DP_160 = 160;
const double DP_200 = 200;
const double DP_250 = 250;
const double DP_280 = 280;
const double DP_300 = 300;
const double DP_320 = 320;
const double DP_450 = 450;
const double DP_400 = 400;
const double DP_380 = 380;
const double DP_340 = 340;
const double DP_350 = 350;
const double DP_370 = 370;
const double DP_90 = 90;

const double DP_120 = 120;
const double DP_150 = 150;
const double DP_180 = 180;
const double DP_15 = 15;
const double DP_40 = 40;
const double DP_20 = 20;
const double DP_50 = 50;
const double DP_30 = 30;
const double DP_60 = 60;
const double DP_80 = 80;
const double DP_10 = 10;
const double DP_8 = 8;
const mainColor = Color.fromRGBO(77, 117, 215, 1);
const divideColor = Color.fromARGB(255, 246, 246, 246);
const f0Color = Color.fromARGB(255, 240, 240, 240);
const white = Colors.white;
const black = Colors.black;
const black_99 = Color.fromARGB(255, 99, 99, 99);
const grey = Color.fromARGB(88, 194, 190, 190);
Color hexToColor(String s) {
  // 如果传入的十六进制颜色值不符合要求，返回默认值
  if (s == null ||
      s.length != 7 ||
      int.tryParse(s.substring(1, 7), radix: 16) == null) {
    return mainColor;
  }

  return new Color(int.parse(s.substring(1, 7), radix: 16) + 0xFF000000);
}
